<template>
	<div>
		<div class="order-line margin replyTxt">
			<textarea class="c-textarea"
			placeholder="请描述报修结果"
			v-model="txt"
			@keyup="$emit('writeComment', txt)"></textarea>
			<recordAudio @recordId="record"></recordAudio>
		</div>
		<addImg
		@clickImg(img) = "$emit('clickImg', img)"
		@imgChange= "imgChange"></addImg>
		<div class="order-line margin">
			<span class="fl">确认处理完毕(最后一次提交时勾选)</span>
			<span class="fr">
				<div class="check"
				:class="{active: isLast}"
				@click="clickLast">√</div>
			</span>
		</div>
	</div>
</template>
<script>
	import addImg from '../addImg'
	import recordAudio from './RecordAudio'
	export default{
		name: 'RepairmanConfirm',
		data(){
			return {
				txt:'',
				isLast: false,
				fm:''
			}
		},
		methods:{
			imgChange(files){
				this.$emit('imgChange', files);
			},
			clickLast(){
				this.isLast = !this.isLast;
				this.$emit('isFinished', this.isLast);
			},
			record(id){
				this.$emit('recordId', id);
			}
		},
		mounted(){
		},
		props:['confirmData'],
		components: {addImg,recordAudio}
	}
</script>
<style lang='less' scoped>
	.check{
		width: 0.51rem;
		height: .51rem;
		border-radius: 100%;
		line-height: .51rem;
		font-size: .38rem;
		text-align: center;
		color: #fff;
		background: #ddd;
		&.active{
			background: #6DB1FF;
		}
	}
</style>